<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>在线相册信息管理</title>
	<script type="text/javascript">
        //删除图片时确认是否要删除
		function doDel(url){
			if (confirm("确定要删除吗？")){
				window.location=url
			}
		}
	</script>
</head>
<body>
	<center>
		{% include "picapp/picman/menu.html" %}
        <h3>浏览相册图片信息</h3>
        <!--相册图片清单表格开始-->
        <table width="800" border="1" bordercolor="#ddd" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
            <tr>
                <th>id号</th>
                <th>标题</th>
                <th>图片</th>
                <th>时间</th>
                <th>操作</th>
            </tr>
            {% for pic in picslist %}
            {% load pagetag %}
            <tr>
                <td style="padding:5px;">{{ pic.id }}</td>
                <td style="padding:5px;">{{ pic.title }}</td>
                <td style="padding:5px;vertical-align:middle;" align="center">
                    <img style="width:75px;" src="{{ pic.filename | thumbnailPath }}">
                </td>
                <td style="padding:5px;">{{ pic.createdate | date:'Y-m-d H:i:s' }}</td>
                <td style="padding:5px;">
                    <a href="{% url 'editpics' pic.id %}">编辑</a>
                    <a href="javascript:doDel('{% url 'delpics' pic.id %}');">删除</a>
                </td>
            </tr>
            {% endfor %}
        </table>
        <!--相册图片清单表格结束-->

        <br/>
        <!--页码清单开始-->
        <b>第 </b>
        {% for i in prlist %}
            {% if i == pIndex %}
                <b style="color:red">{{i}}</b>
            {% else %}
                <a href="{% url 'pics' i %}">{{i}}</a>
            {% endif %}
        {% endfor %}
        <b> 页</b>
        <!--页码清单结束-->
	</center>
</body>
</html>